rangeOrNull

open fun rangeOrNull(value: CharSequence, min: Int, max: Int)

test if a string length is inside the range min … max

Parameters

value

value to test

min

minimum allowed value

max

maximum allowed value

Throws

when value is outside min … max


open fun rangeOrNull(value: CharSequence, min: Int, max: Int, name: String)

test if a string length is inside the range min … max

Parameters

value

value to test

min

minimum allowed value

max

maximum allowed value

name

value name for better error message

Throws

when value is outside min … max